Skip to content

Clarify testIdAttribute #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2019
Merged

Clarify testIdAttribute #330

merged 1 commit into from
Nov 28, 2019

Conversation

paul-russo
Copy link
Contributor

@paul-russo paul-russo commented Nov 27, 2019

I was a bit confused while reading through these docs as to whether or not the value I supplied to testIdAttribute would be prefixed with data-. It turns out that the value is not prefixed, and so my-data-test-id wouldn't be a valid data- attribute. This change replaces the current example my-data-test-id with data-my-test-id. I think this makes this example more clear.

I was a bit confused while reading through these docs as to whether or not the value I supplied to `testIdAttribute` would be prefixed with `data-`. It turns out that the value is _not_ prefixed, and so `my-data-test-id` wouldn't be a valid `data-` attribute. This change replaces the current example `my-data-test-id` with `data-my-test-id`.
@alexkrolick alexkrolick merged commit 1957b04 into testing-library:master Nov 28, 2019
@paul-russo paul-russo deleted the patch-1 branch November 28, 2019 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants